import API from './api';
import http from '../plugin/http';

const getVerCode = async (params: { email: string; }) => {
    return await http.get(API.USERS_VERCODE_QUERY, {
        params
    })
};

const createUser = async (params: { email: string; }) => {
    return await http.post(API.USERS_CREATE, params);
};

const login = async (params: { username: string; password: string }) => {
    return await http.post(API.ADMIN_LOGIN, params);
};

const getUserInfo = async () => {
    return await http.get(API.ADMIN_QUERY);
};

export default {
    getVerCode,
    createUser,
    login,
    getUserInfo,
}